﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Campaign_Manager
{
    public partial class frmAddCampaign : Form
    {

        public frmAddCampaign()
        {
            InitializeComponent();
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            this.DialogResult = System.Windows.Forms.DialogResult.Cancel;
            this.Close();
        }

        private void btnAdd_Click(object sender, EventArgs e)
        {
            this.DialogResult = System.Windows.Forms.DialogResult.OK;
            this.Close();
        }

        public string campName() { return txtName.Text; }
        public string campCreator() { return txtCreator.Text; }
        public string campPassword() { return txtPassword.Text; }
        public bool Pass() { return checkPass.Checked; }

        private void checkPass_CheckedChanged(object sender, EventArgs e)
        {
            if (checkPass.Checked)
            {
                txtPassword.Enabled = true;
                txtPassword.Visible = true;
            }
            else
            {
                txtPassword.Enabled = false;
                txtPassword.Visible = false;
            }
        }
    }
}
